package vnreal.ZNEW;

import java.util.List;
import java.util.ArrayList;

class Vertex implements Comparable<Vertex> {
	final String id;
	String vid;
	public List<Edge> adjacencies;
	public double minDistance = Double.POSITIVE_INFINITY;
	public Vertex previous;
	public boolean isOn;
	public double endingCost;

	public Vertex() {
		this.id = "0";
	}
	
	public Vertex(String id) {
		this.id = id;
		this.adjacencies = new ArrayList<Edge>();
	}

	public String toString() {
		return this.id;
	}

	public int compareTo(Vertex other) {
		return Double.compare(minDistance, other.minDistance);
	}
}

class Edge {
	public final Vertex target;
	public final double weight;

	public Edge(Vertex argTarget, double argWeight) {
		target = argTarget;
		weight = argWeight;
	}
}
